package com.nbers.springcloud.microservice.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

/**
 * @auther simon
 * @create 2020-04-16
 * @describe 租房实体类
 */
@Data
@TableName("rent_house")
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value = "RentHouse对象", description = "租房")
public class RentHouse extends Model<RentHouse> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId("id")
    private String id;

    @ApiModelProperty(value = "标题")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "检索时间")
    @TableField("time")
    private LocalDateTime time;

    @ApiModelProperty(value = "信息来源")
    @TableField("resource")
    private String resource;

    @ApiModelProperty(value = "链接")
    @TableField("url")
    private String url;

    @ApiModelProperty(value = "租赁方式")
    @TableField("rent_type")
    private String rentType;

    @ApiModelProperty(value = "价格")
    @TableField("price")
    private Float price;

    @ApiModelProperty(value = "位置")
    @TableField("location")
    private String location;

    @ApiModelProperty(value = "地址")
    @TableField("address")
    private String address;

    @ApiModelProperty(value = "面积")
    @TableField("area")
    private String area;

    @ApiModelProperty(value = "楼层")
    @TableField("floor")
    private String floor;

    @ApiModelProperty(value = "评价")
    @TableField("appraise")
    private String appraise;

    @ApiModelProperty(value = "图片1地址")
    @TableField("img1")
    private String img1;

    @ApiModelProperty(value = "图片2地址")
    @TableField("img2")
    private String img2;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}